#ifndef _QUEUE_H_
#define _QUEUE_H_

#define QUEUE_BUFFER_SIZE 4000


typedef struct node_packet{
	unsigned int length;
	unsigned int initialized;
	unsigned int processed;
	struct node_packet* next;
	struct node_packet* previous;
	struct honeypot_command_packet pkt;
} node_packet;

typedef struct queue_str{
	unsigned int size;      // number of nodes in the queue
	struct node_packet* head;
	struct node_packet* tail;
} queue_str;




// prototypes
struct queue_str* queue_init(struct queue_str* q);
void enqueue_packet(struct honeypot_command_packet *command_loc, struct queue_str *q, unsigned int length);
struct node_packet* dequeue_packet(struct queue_str *q);
struct node_packet* dequeue_lock_packet(struct queue_str *q, int* queue_lock);
void enqueue_lock_packet(struct honeypot_command_packet *command_loc, struct queue_str *q, unsigned int length, int* queue_lock);


#endif
